﻿<phone:PhoneApplicationPage
    x:Class="GY.WP.PostMemo.Views.MemoSettings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    Style="{StaticResource TransitionPageStyle}"
    toolkit:TiltEffect.IsTiltEnabled="True"
    >

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="{Binding Path=AppName, Source={StaticResource LocalizedStrings}}">

            <controls:PivotItem Header="{Binding Path=PivotItemHeader_Settings, Source={StaticResource LocalizedStrings}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50" />
                        <RowDefinition Height="120" />
                        <RowDefinition Height="120" />
                        <RowDefinition Height="120" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <TextBlock Text="{Binding Path=Settings_Color_Title, Source={StaticResource LocalizedStrings}}" Margin="12"/>
                    <toolkit:ListPicker ItemsSource="{Binding AccentColorList}"
                                        Header="{Binding Path=PivotItemHeader_Todo, Source={StaticResource LocalizedStrings}}"
                                        FullModeHeader="{Binding Path=PivotItemHeader_Todo, Source={StaticResource LocalizedStrings}}"
                                        SelectedIndex="{Binding TodoMemoListColorSelectedIndex, Mode=TwoWay}"
                                        CacheMode="BitmapCache"
                                        Grid.Row="1"
                                        >
                        <toolkit:ListPicker.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Fill="{Binding ColorName, Converter={StaticResource AccentColorNameToBrushConverter}}" Width="24" Height="24"/>
                                    <TextBlock Text="{Binding ColorDisplayName}" Margin="12, 0, 0, 0"/>
                                </StackPanel>
                            </DataTemplate>
                        </toolkit:ListPicker.ItemTemplate>
                        <toolkit:ListPicker.FullModeItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0, 20, 0, 20">
                                    <Rectangle Fill="{Binding ColorName, Converter={StaticResource AccentColorNameToBrushConverter}}" Width="43" Height="43"/>
                                    <TextBlock Text="{Binding ColorDisplayName}"
                                               Margin="16 0 0 0"
                                               FontSize="{StaticResource PhoneFontSizeExtraLarge}"
                                               FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                                </StackPanel>
                            </DataTemplate>
                        </toolkit:ListPicker.FullModeItemTemplate>
                    </toolkit:ListPicker>
                    <toolkit:ListPicker ItemsSource="{Binding AccentColorList}"
                                        Header="{Binding Path=PivotItemHeader_Done, Source={StaticResource LocalizedStrings}}"
                                        FullModeHeader="{Binding Path=PivotItemHeader_Done, Source={StaticResource LocalizedStrings}}"
                                        SelectedIndex="{Binding DoneMemoListColorSelectedIndex, Mode=TwoWay}"
                                        CacheMode="BitmapCache"
                                        Grid.Row="2"
                                        >
                        <toolkit:ListPicker.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Fill="{Binding ColorName, Converter={StaticResource AccentColorNameToBrushConverter}}" Width="24" Height="24"/>
                                    <TextBlock Text="{Binding ColorDisplayName}" Margin="12, 0, 0, 0"/>
                                </StackPanel>
                            </DataTemplate>
                        </toolkit:ListPicker.ItemTemplate>
                        <toolkit:ListPicker.FullModeItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0, 20, 0, 20">
                                    <Rectangle Fill="{Binding ColorName, Converter={StaticResource AccentColorNameToBrushConverter}}" Width="43" Height="43"/>
                                    <TextBlock Text="{Binding ColorDisplayName}"
                                               Margin="16 0 0 0"
                                               FontSize="{StaticResource PhoneFontSizeExtraLarge}"
                                               FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                                </StackPanel>
                            </DataTemplate>
                        </toolkit:ListPicker.FullModeItemTemplate>
                    </toolkit:ListPicker>
                    <toolkit:ListPicker ItemsSource="{Binding AccentColorList}"
                                        Header="{Binding Path=PivotItemHeader_All, Source={StaticResource LocalizedStrings}}"
                                        FullModeHeader="{Binding Path=PivotItemHeader_All, Source={StaticResource LocalizedStrings}}"
                                        SelectedIndex="{Binding AllMemoListColorSelectedIndex, Mode=TwoWay}"
                                        CacheMode="BitmapCache"
                                        Grid.Row="3"
                                        >
                        <toolkit:ListPicker.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Rectangle Fill="{Binding ColorName, Converter={StaticResource AccentColorNameToBrushConverter}}" Width="24" Height="24"/>
                                    <TextBlock Text="{Binding ColorDisplayName}" Margin="12, 0, 0, 0"/>
                                </StackPanel>
                            </DataTemplate>
                        </toolkit:ListPicker.ItemTemplate>
                        <toolkit:ListPicker.FullModeItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0, 20, 0, 20">
                                    <Rectangle Fill="{Binding ColorName, Converter={StaticResource AccentColorNameToBrushConverter}}" Width="43" Height="43"/>
                                    <TextBlock Text="{Binding ColorDisplayName}"
                                               Margin="16 0 0 0"
                                               FontSize="{StaticResource PhoneFontSizeExtraLarge}"
                                               FontFamily="{StaticResource PhoneFontFamilyLight}"/>
                                </StackPanel>
                            </DataTemplate>
                        </toolkit:ListPicker.FullModeItemTemplate>
                    </toolkit:ListPicker>
                </Grid>
            </controls:PivotItem>

            <!--<controls:PivotItem Header="{Binding Path=PivotItemHeader_Help, Source={StaticResource LocalizedStrings}}">
                <Grid>
                    <TextBlock FontSize="{StaticResource PhoneFontSizeExtraLarge}" TextWrapping="Wrap">
                        Fast record your spark; Full manager your memos;
                    </TextBlock>
                </Grid>
            </controls:PivotItem>-->

            <controls:PivotItem Header="{Binding Path=PivotItemHeader_About, Source={StaticResource LocalizedStrings}}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="382*" />
                        <RowDefinition Height="618*" />
                    </Grid.RowDefinitions>
                    <StackPanel HorizontalAlignment="Center">
                        <TextBlock Margin="0,0,0,10" FontSize="{StaticResource PhoneFontSizeExtraLarge}" HorizontalAlignment="Center" Text="{Binding Path=AppName, Source={StaticResource LocalizedStrings}}"/>
                        <TextBlock Margin="0,0,0,10" Text="{Binding AppVersionString}" Name="textBlockVersion" HorizontalAlignment="Center" FontSize="{StaticResource PhoneFontSizeMedium}" />
                        <Button Width="220" Margin="0,20,0,0" HorizontalAlignment="Center" Name="buttonFeedback" Click="buttonFeedback_Click" Content="{Binding Path=AppFeedback, Source={StaticResource LocalizedStrings}}" FontSize="{StaticResource PhoneFontSizeMediumLarge}" BorderThickness="1" />
                    </StackPanel>
                    <ScrollViewer Grid.Row="1">
                        <TextBlock Name="textBlockRoadmap" Text="{Binding Path=AppRoadmap, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" FontSize="{StaticResource PhoneFontSizeMedium}" />
                    </ScrollViewer>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
    
</phone:PhoneApplicationPage>